--[[
Copyright reserved by latyas
]]--

local fs = require "nixio.fs"
local nixio = require "nixio"

local drcom_running =(luci.sys.call("ps | grep drcom |egrep -v grep > /dev/null") == 0)
local client_status

if drcom_running then	
	client_status = "客户端运行中"
else
	client_status = "<font color=red>客户端未运行</font>"
end

m = Map("drcom", translate("DrCOM"), translate(client_status))

server = m:section(TypedSection, "drcom", translate("用户配置"))
server.anonymous = true

enable = server:option(Flag, "enable", translate("开启Dr.com"))

remote_server = server:option(Value, "server", translate("认证服务器地址"))
remote_server.datatype = "ip4addr"

pppoe_flag = server:option(Value, "pppoe_flag", translate("标志位1"))

keep_alive2_flag = server:option(Value, "keep_alive2_flag", translate("标志位2"))

server:option(DummyValue, "qq", translate("获得更多帮助"))

return m